import Mock from 'mockjs'
import markdownh from './markdown'
let params = Mock.mock({ // 数据池
    'userTableData|10': [{ // 图表过滤所需数据
        'name': '@cname',
        'date': '@date',
        'province': '@province',
        'city': '@city',
        'address': '@county(true) @ctitle() @natural(1000,9999) 号',
        'zip': '@zip'
    }]
})
let data_0 = Mock.mock({ // 数据池
    'data|10': [{
        'id|+1': 1,
        'title': '@ctitle',
        'url': Mock.Random.url()
    }]
})
export default {
    getItemList: () => ({
        code: 20000,
        data: params
    }),
    aside: () => ({
        code: 20000,
        data: data_0.data
    }),
    tag: () => ({
        code: 20000,
        data: {
            "/": [
                { tag: "java1", tagid: 1 },
                { tag: "C++1", tagid: 2 }
            ], "/neitui": [
                { tag: "java2", tagid: 1 },
                { tag: "C++2", tagid: 2 }
            ], "default": [{ tag: "javad", tagid: 1 },
            { tag: "C++d", tagid: 2 }]
        }
    }),
    markdownh: () => ({
        code: 20000,
        data: markdownh
    }),
    login: () => ({
        code: 20000,
        data: {
            username: 'admin',
            message: 'sucess',
            token: 'bear-ntyuiop',
            url: '@/assets/avatar/01.jpg'
        }
    }),
    topcom: () => ({
        code: 20000,
        data: [
            {
                id: 1,
                title: 'Accuntrue'
            },
            {
                id: 2,
                title: 'IBM'
            },
            {
                id: 3,
                title: '亚信'
            },
            {
                id: 4,
                title: '中软国际'
            }
        ]
    })
    , resourcelist: () => ({
        code: 20000,
        data: {
            total: 20,
            // items: data_1.items
            items: [{ id: 1, title: 'eclipse-mars-ee', content: 'jdk1-8,javaee版本,内置svn和uml画图插件', date: '2022-01-02', username: 'administrator' },
            { id: 2, title: 'javaJDK1.8', content: '8_u112版本，jdk1-8官方完整版本', date: '2022-01-02', username: 'administrator' },
            { id: 3, title: 'DIF', content: '非常好用的差分工具，适合文档对比功能', date: '2022-01-02', username: 'administrator' },
            { id: 4, title: 'eclipse-mars-ee', content: 'jdk1-8,javaee版本,内置svn和uml画图插件', date: '2022-01-02', username: 'administrator' },
            { id: 5, title: 'eclipse-mars-ee', content: 'jdk1-8,javaee版本,内置svn和uml画图插件', date: '2022-01-02', username: 'administrator' },
            { id: 6, title: 'eclipse-mars-ee', content: 'jdk1-8,javaee版本,内置svn和uml画图插件', date: '2022-01-02', username: 'administrator' },
            { id: 7, title: 'eclipse-mars-ee', content: 'jdk1-8,javaee版本,内置svn和uml画图插件', date: '2022-01-02', username: 'administrator' },
            { id: 8, title: 'eclipse-mars-ee', content: 'jdk1-8,javaee版本,内置svn和uml画图插件', date: '2022-01-02', username: 'administrator' },
            { id: 9, title: 'eclipse-mars-ee', content: 'jdk1-8,javaee版本,内置svn和uml画图插件', date: '2022-01-02', username: 'administrator' },
            ]
        }
    }),
    getresource: ()=>({
        code: 20000,
        data: {
           content: data_1,
           username: 'Administrator',
           title: 'JDK8',
           id: 1,
           date: '2021-02-09'
        }
    }),
    getInfo: () => ({
        code: 20000,
        data: {
            roles: "administrator", name: "max", avatar:"avatar", introduction:"introduction"
        }
        
    })
}
// let data_1 = Mock.mock({ // 数据池
//     // 'items|20': [{
//     //     order_no: '@ctitle()',
//     //     timestamp: +Mock.Random.date('T'),
//     //     username: '@name()',
//     //     content: '@ctitle()',
//     //     date: '@date(yyyy-MM-dd)',
//     // }]
// })


let data_1 = `DO NOT TRANSLATE OR LOCALIZE.
-----------------------------

%% This notice is provided with respect to ASM Bytecode Manipulation 
Framework v5.0.3, which may be included with JRE 8, and JDK 8, and 
OpenJDK 8.

--- begin of LICENSE ---

Copyright (c) 2000-2011 France Télécom
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holders nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

--- end of LICENSE ---
`